package com.jie.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.models.auth.In;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.Date;

/**
 * @Author: 杰
 * @Project :net-disk
 * @DateTime: 2024/4/22 16:03
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class UserExerciseDTO {

    /**
     * 训练专题id
     */
    private Integer topicId;
    /**
     * 训练专题名称
     */
    private String topicName;

    /**
     * 训练进度
     */
    private Integer trainingProgress;

    /**
     * 训练封面
     */
    private String topicImages;
    /**
     * 训练作者名称
     */
    private String videoAuthorName;
    /**
     * 训练作者头像
     */
    //作者头像
    private String authorImages;

    /**
     * 训练日期
     */
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    // 格式化
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime sportDate;
}
